<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>contentFilter</title>
    <style>
        .highlight {
            padding: 10px;
            border: 1px solid yellow;
            background-color: lightyellow;
        }
    </style>
</head>
<body>

<p></p>
<p></p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Delectus, earum.</p>
<p>123 <span>456</span></p>
<input type="text" value="input">

<script src="../vendor/jquery-1.12.4.js"></script>
<script>
    $(function () {
//                console.log($(':empty').addClass('highlight'));
//                console.log($('p:contains("Lorem")').addClass('highlight'));
                console.log($('p:has(span)').addClass('highlight'));
//        console.log($('p:parent').addClass('highlight'));
    });
</script>
</body>
</html>